<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>关闭淘宝二维码</title>
		<style type="text/css">
			.box {
				width: 200px;
				height: 200px;
				margin: 30px auto;
				/*background-color: pink;*/
				overflow: hidden;
			}
			.box .img_box {
				position: relative;
				display: block;
				margin: 20px 20px;
				width: 160px;
				height: 160px;
			}
			.box .img_box img {
				display: block;
				width: 100%;
				height: 100%;
			}
			.img_box .close {
				position: absolute;
				top: 0;
				left: -10%;
				display: block;
				width: 15px;
				height: 15px;
			}
			
			.img_box .close img {
				width: 100%;
				height: 100%;
			}

		</style>
	</head>
	<body>
		<div class="box">
			<div class="img_box">
				<i class="close">
					<img src="img/wrong.png"/>
				</i>
				<img src="img/tao.png" class="taobao"/>
			</div>
		</div>
		
		<script type="text/javascript">
			var btn = document.querySelector('.close');
			var taobao = document.querySelector('.taobao');
			
			//绑定事件
			btn.onclick = function() {
				taobao.style.display = 'none'
				this.style.display = 'none'
			}
		</script>
	</body>
</html>
